
#OPT = -Dn_MIN=0.005 -Dn_MAX=25 -D_BINES=5 -D_max_Z=0.10 -D_min_Z=0.02
OPT = -Dn_MIN=0.04 -Dn_MAX=30 -D_BINES=15 -D_max_Z=0.510 -D_min_Z=0.10

CFLAGS = $(OPT) 
INCL   = dat3d.h

EXEC_cross   = ./bili/marcos_x
OBJS_cross   = marcos_x.o funcs.o

EXEC_sigpi   = ./bili/sigpi
OBJ_sigpi    = sigpi.o	funcs.o

#SYSTEM = "AMD"
#SYSTEM = "OPA"
#SYSTEM = "SALVATAJE"
SYSTEM = "Dante"

cross : $(EXEC_cross)

sigpi : $(OBJ_sigpi)
	$(CC) $(OBJ_sigpi) $(LIBS) $(OPT) -o $(EXEC_sigpi)

ifeq ($(SYSTEM),"AMD")
CC     =  g++            # sets the C-compiler
LIBS   = -I/afs/mpa/project/sim/users/kdolag/fstasys/soft/Healpix_2.01/src/cxx/generic_gcc_64/include  -L/afs/mpa/project/sim/users/kdolag/fstasys/soft/Healpix_2.01/src/cxx/generic_gcc_64/lib -lm -lhealpix_cxx
endif
ifeq ($(SYSTEM),"OPA")
CC     =  g++            # sets the C-compiler
LIBS   = -I/afs/mpa/project/sim/users/kdolag/fstasys/soft/Healpix_2.01/src/cxx/generic_gcc_64/include  -L/afs/mpa/project/sim/users/kdolag/fstasys/soft/Healpix_2.01/src/cxx/generic_gcc_64/lib -lm -lhealpix_cxx 
endif
ifeq ($(SYSTEM),"SALVATAJE")
CC     =  g++            # sets the C-compiler
LIBS   =  -lm -lhealpix_cxx
endif
ifeq ($(SYSTEM),"Dante")
       CC     =  g++            # sets the C-compiler
      LIBS   = -I./Healpix_2.11c/src/cxx/generic_gcc_64/include  -L./Healpix_2.11c/src/cxx/generic_gcc/lib -lm -lhealpix_cxx
endif


$(EXEC_cross): $(OBJS_cross) 
	$(CC) $(OBJS_cross) $(LIBS)  -o  $(EXEC_cross)  

$(OBJ_sigpi): $(INCL)

#.o: funcs.cpp 
#	$(CC) $(OPT) -o $@ -c  $<
%.o: %.cpp 
	$(CC) $(OPT) -o $@ -c $<

.PHONY : clean
clean:
	rm -f *.o core.*

